{% extends "reporting/reporting_base.html" %}
{% load i18n %}
{% block stylesheet %}/media/css/creation.css{% endblock %}

{% block extrastyle %}
<link rel="stylesheet" type="text/css" href="/media/css/reports.css"/> {% endblock %}
{% block title %}
Reoprting
{% endblock %}
{% block breadcrumbs %}
    {{ block.super }}
    &rsaquo; <li class='crumb'> Create</li>
{% endblock %}
{% block content %}
<div id='inner'>
    <h2 class='header'>Create a Report</h2>
    <form action='.' method='POST'>
	    <table>
		    {{ form }}
	    </table>
    <input class="submit-row" type="submit" value='Save Report'/>
    </form>
</div>
<script type='text/javascript'>
Event.observe(window, 'load', function(){
	['id_user','id_fields'].each(function(elem){
				$(elem).parentNode.parentNode.style.display = 'none'
			})
	})
var fields_elem = 'id_type'
Event.observe($(fields_elem), 'change', function(){
			new Ajax.Updater('id_fields','/reports/json/options',
				{
				  method: 'get',
				  parameters: 'model='+$F(fields_elem)
				  });
			$('id_fields').parentNode.parentNode.style.display = '';
			})
</script>
{% endblock %}

